package com.doform.android.xianggucheng.bean.request_bean;

import com.doform.android.xianggucheng.help.AppHelp;
import com.google.gson.Gson;

/**
 * 作者 Y_MS
 * Created by ${APEN} on 2017-08-03.
 * GitHub：https://github.com/cxydxpx
 */

public class ReqUpdateVendor {

    /**
     * _savetype 	是 	string 	操作类型：新增：add ； 编辑：update
     id 	否 	string 	供应商ID：编辑时需要
     guid 	否 	string 	供应商GUID：编辑时需要
     name 	是 	string 	供应商名称
     state 	是 	string 	状态{1:已合作,2:正在洽谈,3:未合作,0:禁用,-9:删除}
     clsids 	否 	string 	供应的分类ID
     clsnames 	否 	string 	供应的分类名称
     area1 	否 	string 	开启：省ID
     area2 	否 	string 	开启：市ID
     area3 	否 	string 	开启：县ID
     area4 	否 	string 	开启：街道ID
     a1name 	否 	string 	省名称
     a2name 	否 	string 	市名称
     a3name 	否 	string 	县名称
     a4name 	否 	string 	街道名称
     addr 	否 	string 	详细地址
     lnkname 	否 	string 	联系人
     mobile 	否 	string 	手机
     debug 	是 	string 	开启：true
     */
    private String _savetype = "update";
    private String state = "1";
    private boolean debug = AppHelp.getInstance().Debug;
    private String id;
    private String guid;
    private String name;
    private String clsids;
    private String clsnames;
    private String area1;
    private String area2;
    private String area3;
    private String a1name;
    private String a2name;
    private String a3name;
    private String addr;
    private String lnkname;
    private String mobile;
    private String fapostcard;

    public ReqUpdateVendor(String mName, String mPerson, String mPhone, String mDetailAddres, String mCategoryId,
                           String mCategoryName, String mProvinceId, String mProvinceName, String mCityId,
                           String mCityName, String mZoneId, String mZoneName,
                           String id, String guid,String img,String imgFile) {
        this.id = id;
        this.guid = guid;
        this.name = mName;
        this.lnkname = mPerson;
        this.clsids = mCategoryId;
        this.clsnames = mCategoryName;
        this.a1name = mProvinceName;
        this.a2name = mCityName;
        this.a3name = mZoneName;
        this.area1 = mProvinceId;
        this.area2 = mCityId;
        this.area3 = mZoneId;
        this.mobile = mPhone;
        this.addr = mDetailAddres;
        this.fapostcard = img;
    }

    @Override
    public String toString() {
        return new Gson().toJson(this);
    }
}
